{
 "cells": [
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "# Betelgeuse的半径",
   "id": "1032611400019fbd"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-20T06:58:16.716363Z",
     "start_time": "2024-11-20T06:58:16.592750Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import astropy.units as u\n",
    "import numpy as np"
   ],
   "id": "48f4a644991b1902",
   "outputs": [],
   "execution_count": 1
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "Betelgeuse的距离",
   "id": "26d908b78a397245"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-20T06:58:16.722774Z",
     "start_time": "2024-11-20T06:58:16.720676Z"
    }
   },
   "cell_type": "code",
   "source": [
    "parallax = 6.55 # mas\n",
    "d = 1000 / parallax # pc\n",
    "print(d)"
   ],
   "id": "19a11414476b7cc5",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "152.67175572519085\n"
     ]
    }
   ],
   "execution_count": 2
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "绝对星等\n",
    "$m-M=5\\log_{10}{d}-5$\n",
    "\n",
    "其中$m_V=0.42\\,\\mathrm{mag}$, $d=152\\,\\mathrm{pc}$"
   ],
   "id": "8df7b8832a01ce5f"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-20T06:58:16.800002Z",
     "start_time": "2024-11-20T06:58:16.797861Z"
    }
   },
   "cell_type": "code",
   "source": [
    "M = 0.42-5*np.log10(d) + 5\n",
    "print(M)"
   ],
   "id": "a57355a075b2abb",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-5.498793500041083\n"
     ]
    }
   ],
   "execution_count": 3
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "与太阳比较流量 $F_1/F_2$\n",
    "\n",
    "$m_{B}-m_{Sun}=-2.5 \\log_{10}\\left( \\dfrac{F_{B}}{F_{Sun}} \\right)$ "
   ],
   "id": "f32ab947abc8ff88"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-20T06:58:16.872953Z",
     "start_time": "2024-11-20T06:58:16.870965Z"
    }
   },
   "cell_type": "code",
   "source": [
    "F1_F2 = 10**(((M)-(4.83))/(-2.5))\n",
    "print(F1_F2)"
   ],
   "id": "3f247ab455ca2c66",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "13536.843249724629\n"
     ]
    }
   ],
   "execution_count": 4
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "已知太阳的温度为有效温度为5800K， Betelguse的有效温度为3000K\n",
    "\n",
    "黑体辐射公式\n",
    "\n",
    "$F=4\\pi r^2 \\cdot \\sigma T^4$\n",
    "\n",
    "半径之比 $\\dfrac{r_B}{r_{Sun}}$"
   ],
   "id": "fa5bda90c3865c05"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-20T06:58:16.890438Z",
     "start_time": "2024-11-20T06:58:16.887265Z"
    }
   },
   "cell_type": "code",
   "source": "np.sqrt(F1_F2*(5800/3000)**4)",
   "id": "b5e610bf25defce7",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(434.88274634868253)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 5
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-20T06:58:16.905074Z",
     "start_time": "2024-11-20T06:58:16.903588Z"
    }
   },
   "cell_type": "code",
   "source": "",
   "id": "8f66bb45602414ca",
   "outputs": [],
   "execution_count": null
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
